#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
工具模块

提供配置管理、日志管理、辅助函数等功能。
"""

from .config import (
    ConfigManager,
    config_manager,
    get_config,
    set_config,
    save_config,
    reload_config
)

from .logger import (
    LoggerManager,
    logger_manager,
    get_logger,
    setup_logging,
    log_function_call,
    log_execution_time,
    debug,
    info,
    warning,
    error,
    critical,
    exception
)

from .helpers import (
    ensure_directory,
    get_file_size,
    get_file_extension,
    is_excel_file,
    get_excel_sheets,
    format_file_size,
    format_number,
    calculate_percentage,
    calculate_change_rate,
    calculate_moving_average,
    find_peak_value,
    find_trend_direction,
    validate_date_format,
    parse_date_range,
    generate_file_hash,
    clean_filename,
    create_backup_file,
    safe_json_dump,
    safe_json_load,
    get_system_info,
    format_duration,
    retry_on_error
)

__all__ = [
    # 配置管理
    'ConfigManager',
    'config_manager',
    'get_config',
    'set_config',
    'save_config',
    'reload_config',
    
    # 日志管理
    'LoggerManager',
    'logger_manager',
    'get_logger',
    'setup_logging',
    'log_function_call',
    'log_execution_time',
    'debug',
    'info',
    'warning',
    'error',
    'critical',
    'exception',
    
    # 辅助函数
    'ensure_directory',
    'get_file_size',
    'get_file_extension',
    'is_excel_file',
    'get_excel_sheets',
    'format_file_size',
    'format_number',
    'calculate_percentage',
    'calculate_change_rate',
    'calculate_moving_average',
    'find_peak_value',
    'find_trend_direction',
    'validate_date_format',
    'parse_date_range',
    'generate_file_hash',
    'clean_filename',
    'create_backup_file',
    'safe_json_dump',
    'safe_json_load',
    'get_system_info',
    'format_duration',
    'retry_on_error'
] 